﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CloakSoket : GearSoket
{
   
    [SerializeField]
    private SpriteRenderer parentRenderer;
    private float curY;
    public override void setAxis(float x, float y)
    {

        base.setAxis(x, y);
       
        if (y > 0 &&( x<-0.5 || x>0.5))
        {
            spriteRenderer.sortingOrder = parentRenderer.sortingOrder -1;
           
            
        }
        else if (y > 0)
        {
            spriteRenderer.sortingOrder = parentRenderer.sortingOrder + 15;
        }
      
        else
        {
            
            spriteRenderer.sortingOrder = parentRenderer.sortingOrder -1;
  

        }
        
      

    }
}
